home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000090_icon-group-sender_Thu Oct 24 16:24:22 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g9ONNaQ17534
for icon-group-addresses; Thu, 24 Oct 2002 16:23:36 -0700 (MST)
Message-Id: <200210242323.g9ONNaQ17534@baskerville.CS.Arizona.EDU>
Date: Thu, 24 Oct 2002 13:13:16 -0700 (MST)
From: Gregg Townsend <gmt>
To: icon-group
Subject: Re: move_corresponding
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Here's what I came up with, realizing that Icon will fail gracefully
when the names don't match:
# movecorr(R1, R2) copies values from the fields of record R1 into
# fields of the same names (if any) in record R2, and returns R2.
procedure movecorr(R1, R2)
local s
every s := (name(!R1) ? (tab(upto('.') + 1) & tab(0))) do
R2[s] := R1[s]
return R2
end
---------------------------------------------------------------------------
Gregg Townsend Staff Scientist The University of Arizona
gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA